﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using Aulac.Global.Xml;
using Aulac.Client.Connect.Ems;
using Aulac.Rsc.Ems.Tags;

namespace Aulac.Client.Reports.Ems.RptStoreVch.RptHelper
{
    public class RptHelperStoreVch
    {
        /// <summary>
        /// Lay thong tin du lieu cho Bang Ke Phieu Nhap Kho
        /// </summary>
        public static XmlDataDocument GetDbRptRecStoreVch(string pStorePrkID, string pVchDateFrom, string pVchDateTo)
        {
            XmlDataDocument xmlDoc = DataRequest.CreateXmlDocument(Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.GetRptListRecStoreVch, Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.Noun.RptStore);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.StorePrkID, pStorePrkID);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateFrom, pVchDateFrom);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateTo, pVchDateTo);
            return DataRequest.ProcessRequest(xmlDoc);        
        }


        /// <summary>
        /// Lay thong tin du lieu cho Bang Ke Phieu Xuat Kho
        /// </summary>
        public static XmlDataDocument GetDbRptRelsStoreVch(string pStorePrkID, string pVchDateFrom, string pVchDateTo)
        {
            XmlDataDocument xmlDoc = DataRequest.CreateXmlDocument(Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.GetRptListRelsStoreVch, Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.Noun.RptStore);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.StorePrkID, pStorePrkID);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateFrom, pVchDateFrom);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateTo, pVchDateTo);
            return DataRequest.ProcessRequest(xmlDoc);
        }

        /// <summary>
        /// Lay thong tin Chi tiet Phieu Nhap Kho.
        /// </summary>
        public static XmlDataDocument GetDbRptDetailRecStoreVch(string pStorePrkID, string pVchDateFrom, string pVchDateTo)
        {
            XmlDataDocument xmlDoc = DataRequest.CreateXmlDocument(Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.GetRptListDetailRecStoreVch, Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.Noun.RptStore);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.StorePrkID, pStorePrkID);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateFrom, pVchDateFrom);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateTo, pVchDateTo);
            return DataRequest.ProcessRequest(xmlDoc);        
        }

        /// <summary>
        /// Lay thong tin chi tiet Phieu Xuat Kho
        /// </summary>
        public static XmlDataDocument GetDbRptDetailRelsStoreVch(string pStorePrkID, string pVchDateFrom, string pVchDateTo)
        {
            XmlDataDocument xmlDoc = DataRequest.CreateXmlDocument(Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.GetRptListDetailRelsStoreVch, Aulac.Verb.Ems.AulacEmsVerb.MngStore.RptStore.Noun.RptStore);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.StorePrkID, pStorePrkID);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateFrom, pVchDateFrom);
            XmlProcess.AddValueParamItem(xmlDoc, tagVch.Inv.VchDateTo, pVchDateTo);
            return DataRequest.ProcessRequest(xmlDoc);
        }
    }
}
